<h2>Resources</h2>
<table>
    <tr>
        <td>Id</td><td><?php echo $authresource['Authresource']['id']; ?></td>
    </tr>
    <tr>
        <td>Resource Name : </td><td><?php echo $authresource['Authresource']['name']; ?></td>
    </tr>
    <tr>
        <td>Resource Description : </td><td><?php echo $authresource['Authresource']['description']; ?></td>
    </tr>
    <tr>
        <td>Resource Group : </td><td><?php echo $this->Html->link($authresource['Authresourcegroup']['name'], array('controller' => 'authresourcegroups', 'action' => 'view', $authresource['Authresourcegroup']['id'])); ?></td>
    </tr>
</table>

<h3>Related User Groups</h3>
<?php if (!empty($authresource['Authusergroup'])): ?>
    <table cellpadding = "0" cellspacing = "0" class="list issues">
        <tr>                
            <th>Group Name</th>
            <th>Group Parent Id</th>
            <th class="actions">Actions</th>
        </tr>
        <?php foreach ($authresource['Authusergroup'] as $authusergroup): ?>
            <tr>

                <td><?php echo $authusergroup['name']; ?></td>
                <td><?php echo (($authusergroup['parent_id']) == 'EMPTY') ? '' : $authusergroup['parent_id']; ?></td>
                <td class="actions">
                    <?php echo $this->Html->link(__('View', true), array('controller' => 'authusergroups', 'action' => 'view', $authusergroup['id']), array('class' => 'icon icon-read')); ?>
                    <?php echo $this->Html->link(__('Edit', true), array('controller' => 'authusergroups', 'action' => 'edit', $authusergroup['id']), array('class' => 'icon icon-edit')); ?>
                    <?php echo $this->Html->link(__('Delete', true), array('controller' => 'authusergroups', 'action' => 'delete', $authusergroup['id']), array('class' => 'icon icon-delete'), null, sprintf(__('Are you sure you want to delete # %s?', true), $authusergroup['id'])); ?>
                </td>
            </tr>
        <?php endforeach; ?>
    </table>
<?php endif; ?>